package com.isoft.demo.dao;

import com.isoft.demo.entity.Checkfee;
import com.isoft.demo.entity.CustomerInfo;
import com.isoft.demo.entity.Employee;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
@Repository
public interface CheckDao {
    @Select("select * from checkprofit")
    List<Checkfee> checkAll();

    @Select("select sum(outpay)-sum(income) as pr from checkprofit")
    List<Checkfee> integ();




    @Select("select proid,pro_mid,pro_eidsal,pro_comid,income,outpay,profit,pro_eid from checkprofit")
    List<Checkfee>searchProfit();

    @Select("select eid,ename,esalary,epost,emonth,esum from employee where eid=#{eid}")
    List<Checkfee>searchProfitById(int proid);
}




//public interface CheckDao {
//    void addCheck(Checkfee checkfee);
//    @Insert("insert into profit(proid,pro_mid,pro_eidsal,pro_comid,income,outpay,profit,pro_eid) values (#{proid},#{pro_mid},#{pro_eidsal},#{pro_comid},#{income},#{outpay},#{profit},#{pro_eid})")
//
//    @Select("select * from profit")
//    List<Checkfee> checkfindAll();
//
//
//
//
//
//
//}
